package com.itheima.day13work;

import java.util.concurrent.locks.ReentrantLock;

public class CDFDemo2 {
    public static void main(String[] args) {
        /*ReentrantLock  rtl=new ReentrantLock(); //学习笔记
        rtl.lock();//开启锁
        rtl.unlock();//关闭锁*/
            Desk desk=new Desk();
            Cooker c=new Cooker(desk);
            Food f=new Food(desk);
            Thread t1=new Thread(f);
            Thread t2=new Thread(c);
            t1.start();
            t2.start();
    }
}
